﻿@using Microsoft.AspNetCore.Identity
@inject SignInManager<IdentityUser> SignInManager
@inject UserManager<IdentityUser> UserManager

@{
    var culture = System.Globalization.CultureInfo.CurrentCulture.Name;
}

<ul class="navbar-nav">
    @if (SignInManager.IsSignedIn(User))
    {
        <li class="nav-item">
            <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index"  title="Manage" localize-args="@(new[] { User.Identity.Name })">Hello {0}!</a>
        </li>
        <li class="nav-item">
            <form class="form-inline" asp-area="Identity" asp-page="/Account/Logout"  asp-route-returnUrl="@Url.Page("/", new { area = "", culture })" method="post">
                <button type="submit" class="nav-link btn btn-link text-dark" localize-content>Logout</button>
            </form>
        </li>
    }
    else
    {
        <li class="nav-item">
            <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register"  localize-content>Register</a>
        </li>
        <li class="nav-item">
            <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login"   localize-content>Login</a>
        </li>
    }
</ul>
